From 2d16fe7f98f19fdc87df3a08821618ebb2125cf2 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 14 Sep 2009 14:20:39 +0000 Subject: [PATCH] Report CPU type when we have it. (So I can figure out if we're wasting our time with Universal binaries on Mac...) --- gpsbabel/config.h.in | 3 +++ gpsbabel/configure | 3 ++- gpsbabel/configure.in | 2 +- gpsbabel/gui/setup.iss | 2 +- gpsbabel/gui/upgrade.cpp | 13 ++++++++++++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/gpsbabel/config.h.in b/gpsbabel/config.h.in index acb907a92..393348a85 100644 --- a/gpsbabel/config.h.in +++ b/gpsbabel/config.h.in @@ -30,6 +30,9 @@ /* Define to 1 if you have the `sleep' function. */ #undef HAVE_SLEEP +/* Define to 1 if you have the `uname' function. */ +#undef HAVE_UNAME + /* Define if we have va_copy */ #undef HAVE_VA_COPY diff --git a/gpsbabel/configure b/gpsbabel/configure index be3745f4f..a8db5ea55 100755 --- a/gpsbabel/configure +++ b/gpsbabel/configure @@ -4633,7 +4633,8 @@ fi # AC_CHECK_FUNCS([atexit floor localtime_r memmove memset pow select sqrt strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol strtoul]) -for ac_func in nanosleep sleep + +for ac_func in nanosleep sleep uname do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/gpsbabel/configure.in b/gpsbabel/configure.in index 714b5f66f..dd1bd897c 100644 --- a/gpsbabel/configure.in +++ b/gpsbabel/configure.in @@ -366,7 +366,7 @@ AC_SUBST(DOCDIR) # AC_FUNC_STRTOD # AC_FUNC_VPRINTF # AC_CHECK_FUNCS([atexit floor localtime_r memmove memset pow select sqrt strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol strtoul]) -AC_CHECK_FUNCS([nanosleep sleep]) +AC_CHECK_FUNCS([nanosleep sleep uname]) # # Checks for how the system handles va_list diff --git a/gpsbabel/gui/setup.iss b/gpsbabel/gui/setup.iss index 981c186fa..312b81797 100755 --- a/gpsbabel/gui/setup.iss +++ b/gpsbabel/gui/setup.iss @@ -1,4 +1,4 @@ -; $Id: setup.iss,v 1.7 2009-09-08 16:06:32 robertl Exp $ +; $Id: setup.iss,v 1.8 2009-09-14 14:20:39 robertl Exp $ ; ; NOTE: setup.iss is generated from setup.iss.in via autoconf. ; The generated setup.iss is checked in to help keep the version numbers diff --git a/gpsbabel/gui/upgrade.cpp b/gpsbabel/gui/upgrade.cpp index d4a33f567..b62b241b0 100644 --- a/gpsbabel/gui/upgrade.cpp +++ b/gpsbabel/gui/upgrade.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: upgrade.cpp,v 1.16 2009-09-07 00:55:07 robertl Exp $ +// $Id: upgrade.cpp,v 1.17 2009-09-14 14:20:39 robertl Exp $ /* Copyright (C) 2009 Robert Lipe, robertlipe@gpsbabel.org @@ -21,8 +21,13 @@ #include "upgrade.h" +#include "../config.h" #include "../gbversion.h" +#if HAVE_UNAME +#include +#endif // HAVE_UNAME + #include #include #include @@ -130,6 +135,12 @@ UpgradeCheck::updateStatus UpgradeCheck::checkForUpgrade(const QString ¤tV args += "¤t_gui_version=" VERSION; args += "&installation=" + installationUuid; args += "&os=" + getOsName(); +#if HAVE_UNAME + struct utsname utsname; + if (0 == uname(&utsname)) { + args += "&cpu=" + QString(utsname.machine); + } +#endif args += "&os_ver=" + getOsVersion(); args += "&beta_ok=1"; // Eventually to come from prefs. args += "&lang=" + QLocale::languageToString(locale.language()); -- 2.30.2